package com.lrs.java.j2se_self.collection;

import java.util.*;
public class TestMap {
	public static void main(String[] args){
		Map m1 = new HashMap();
		Map m2 = new TreeMap();
		m1.put("one",new Integer(10));
		m1.put("A",100);       //Auto-boxing
		m1.put("two",new Integer(20));
		m1.put("three",new Integer(30));
		m2.put("1", new Integer(50));
		m2.put("2", "helloWorld");
		//System.out.println(((Integer)m1.get("A")));    //unBoxing
		System.out.println(((Integer)m1.get("A")).intValue());
		System.out.println(m1.get("one"));
		System.out.println(m1.size());
		System.out.println(m1.containsValue(60));
		//System.out.println(m1.containsKey("one") && m1.containsValue(new Integer(10)));
		//m1.clear();
		Map m3 = new HashMap(m1);
		m3.putAll(m2);
		//System.out.println(m1.isEmpty());
		System.out.println(m3);
	}
}
